<?php
	include 'connection.php';
	include 'header.php';

	$profil_ID			= $_GET["username"];
	$profil_password	= $_GET["password"];

	$profil_ID			= stripslashes($profil_ID);
	$profil_password	= stripslashes($profil_password);

	$profil_ID			= mysql_real_escape_string($profil_ID);
	$profil_password	= mysql_real_escape_string($profil_password);

	$query = "SELECT * FROM user WHERE username='$profil_ID' and password='$profil_password'";

	$result = mysql_query($query, $link);

	$count	= mysql_num_rows($result);

	if ($count == 1) {
		echo json_encode(array('status'=>'success'));
	} else {
		echo json_encode(array('status'=>'failed'));
	}

	
?>